﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;
using SimpleData.ObjectModel.Design;

namespace DataAccess.SqlClient
{
	public sealed class DataObjectContext: ObjectContext
	{
		public DataObjectContext()
			: base( "name=SimpleDataEntities", "SimpleDataEntities" )
		{
			this.ContextOptions.LazyLoadingEnabled = false;
			this.ContextOptions.ProxyCreationEnabled = false;
		}


		public ObjectSet<Schema> Schemas
		{
			get { return this.CreateObjectSet<Schema>(); }
		}

		public ObjectSet<FieldDescriptor> Fields
		{
			get { return this.CreateObjectSet<FieldDescriptor>(); }
		}
	}
}
